package com.bs.blog.api;
import com.bs.blog.api.pojo.AddBlogInfoRequest;
import com.bs.blog.api.pojo.BlogInfoResponse;
import com.bs.blog.api.pojo.UpBlogRequest;
import com.bs.common.pojo.Result;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import java.util.List;
@FeignClient(value = "blog-service",path = "/blog")
public interface BlogServiceApi {
    @RequestMapping("/getList")
    List<BlogInfoResponse> getList();

    @RequestMapping("/getBlogDetail")
    BlogInfoResponse getBlogDeatail(@RequestParam("blogId") Integer blogId);
    @RequestMapping("/add")
    Result<Boolean> addBlog(@RequestBody AddBlogInfoRequest addBlogInfoRequest);
    /**
     * 更新博客
     */
    @RequestMapping("/update")
    Boolean updateBlog(@RequestBody UpBlogRequest upBlogRequest);

    @RequestMapping("/delete")
    Boolean deleteBlog(@RequestParam("blogId") Integer blogId);
}
